package menu;

import game.ComBattleMenu;
import game.CustomBattleMenu;
import game.SpecialBattleMenu;

import java.util.Scanner;

/**
 * 模式选择
 */

public class ModeChoice {

    public ModeChoice(){
        System.out.println("---------------------------");
        System.out.println("******** 1. 人机对战 ********");
        System.out.println("******** 2. 快速模式 ********");
        System.out.println("******** 3. 炮战模式 ********");
        System.out.println("******** 4. 返回菜单 ********");
        System.out.println("---------------------------");
    }

    public void start(){
        Scanner scanner = new Scanner(System.in);
        int input = 0;
        do{
            System.out.print("请输入你的选择:>");
            input = scanner.nextInt();
            switch (input){
                case 1:
                    new ComBattleMenu().start();
                    break;
                case 2:
                    new CustomBattleMenu().start();
                    break;
                case 3:
                    new SpecialBattleMenu().start();
                    break;
                case 4:
                    new StartMenu().start();
                    break;
                case 0:
                    System.out.println("游戏结束");
                    System.exit(0);
                default:
                    System.out.println("输入错误, 请重新输入!");
            }
        }while (true);
    }
}
